package com.ruanda.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruanda.domain.MemberCollection;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruanda.domain.Prod;

/**
* @author 亦樂
* @description 针对表【member_collection】的数据库操作Service
* @createDate 2024-09-06 16:26:38
*/
public interface MemberCollectionService extends IService<MemberCollection> {

    /**
     * 查询会员收藏商品的数量
     * @return
     */
    Long queryMemberCollectionProdCount();

    /**
     * 分页查询会员收藏商品列表
     * @param memberOpenId
     * @param current
     * @param size
     * @return
     */
    Page<Prod> queryMemberCollectionProdPageByOpenId(String memberOpenId, Long current, Long size);

    /**
     * 添加或取消收藏
     * @param memberOpenId
     * @param prodId
     * @return
     */
    Integer addOrCancelCollect(String memberOpenId, Long prodId);
}
